package com.junzhiit.nengji.cms.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.cms.service.SystemConfigService;
import com.junzhiit.nengji.cms.web.vo.ResultVO;
import com.junzhiit.nengji.cms.web.vo.SystemConfigEditVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/system/config")
public class SystemConfigController extends BaseController {

	@Autowired
	private SystemConfigService systemConfigService;
	
	@ApiOperation(value="获取配置")
	@RequestMapping(method=RequestMethod.GET)
	public ResultVO find(){
		return systemConfigService.find();
	}
	
	@ApiOperation(value="更新配置")
	@RequestMapping(method=RequestMethod.PUT)
	public ResultVO update(SystemConfigEditVO systemConfigEditVO){
		return systemConfigService.update(systemConfigEditVO);
	}
}
